#ifndef QUEUE_H
#define QUEUE_H
#include "list.h"
#include <pthread.h>

typedef struct {
	struct list_head list;
	int count;
	pthread_cond_t cond;
	pthread_mutex_t lock;
}queue_t;

/* routines of queue */
extern queue_t* queque_create(void);
extern int queue_push(queue_t *queue, struct list_head *new);
extern struct list_head * queue_pop(queue_t *queue);
extern void queue_destroy(queue_t *queue);
extern int queue_length(queue_t *queue);
extern struct list_head *queue_head(queue_t *queue);
#endif
